﻿#pragma once

#include "../../MirControls/MirImageControl.h"
#include "../../MirControls/MirButton.h"
#include "../../MirControls/MirLabel.h"
#include <string>
#include <vector>
#include <any>

using namespace Client::MirControls;
using namespace Client::MirGraphics;
using namespace Client::MirNetwork;
using namespace Client::MirObjects;
using namespace Client::MirSounds;
namespace C = ClientPackets;

namespace Client::MirScenes::Dialogs
{
    class GroupDialog final : public MirImageControl
    {
    public:
        static bool AllowGroup;
        static std::vector<std::string> GroupList;

        MirImageControl *TitleLabel;
        MirButton *SwitchButton, *CloseButton, *AddButton, *DelButton;
        std::vector<MirLabel*> GroupMembers;

        virtual ~GroupDialog()
        {
            delete TitleLabel;
            delete SwitchButton;
            delete CloseButton;
            delete AddButton;
            delete DelButton;
        }

        GroupDialog();

    private:
        void GroupPanel_BeforeDraw(std::any sender, EventArgs *e);

    public:
        void AddMember(const std::string &name);

    private:
        void AddMember();
        void DelMember();
    };
}
